package com.chinasoft.dao.impl;

import com.chinasoft.dao.BookDao;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/*
jdbc.userName=root
jdbc.password=123
 */
@Component("bookDao")
@PropertySource(value = {"classpath:jdbc.properties","classpath:aaa.properties"},ignoreResourceNotFound = true)
public class BookDaoImpl implements BookDao {

    @Value("${jdbc.userName}")
    private String userName;

    @Value("${jdbc.password}")
    private String password;
    @Override
    public void save() {
        System.out.println("book dao running ..." + userName + " " + password);
    }
}